This tutorial describes the Pedal Board's support for MIDI,
including MIDI input devices such as MIDI keyboards, and
the capability to map joystick events to MIDI messages.
Note that much of the following will be irrelevant if the
plugin concerned does not support MIDI.

________
By default, all messages sent to the Pedal Board from the
current MIDI input device will be passed on to all the
plugins currently running.  This feature can be disabled
for individual plugins by un-ticking the 'Accept MIDI
Input' check box in the plugin's Mappings dialog:
<img=docs/images/midi1.png>

________
As mentioned above, the Pedal Board makes it possible to
map Joystick events (or envelope detector events) to MIDI
messages.  To do this, open the plugin's Mappings dialog,
and click the 'Add MIDI' button:
<img=docs/images/midi2.png>
This will open the following dialog, very similar to the
'Add Parameter' dialog:
<img=docs/images/midi3.png>
The first 4 controls are essentially the same as their 'Add
Parameter' counterparts (with the notable exception that
the minimum and maximum ranges are now 0 -> 127, rather
than 0 -> 1).  The fifth control represents the MIDI
message that the mapping will affect.  It offers 128 MIDI
CCs, then (at the bottom of the list) entries for MIDI
Velocity and MIDI Pitch Bend.  The CC and Pitch Bend
entries are fairly easy to understand, but the Velocity one
is slightly more complicated.

The MIDI Velocity entry exists in order to allow you to
create NoteOn and NoteOff events - when the program detects
a velocity greater than 0, it sends a NoteOn message to the
plugin.  It will then wait until it detects a velocity
equal to 0, at which point it will send a NoteOff message
to the plugin.  The note value for the messages is
determined by the sixth control in the dialog.  In this
way it is possible to use a joystick to play a polyphonic
synthesier.
